mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
				synced 2025-10-31 02:37:56 +00:00 
			
		
		
		
	Changing SMS/MFA
This commit is contained in:
		| @@ -149,6 +149,7 @@ namespace OpenWifi { | ||||
|  | ||||
|         SecurityObjects::UserInfo   Existing; | ||||
|         if(!StorageService()->UserDB().GetUserById(Id,Existing)) { | ||||
|             DrainBody(); | ||||
|             return NotFound(); | ||||
|         } | ||||
|  | ||||
| @@ -157,9 +158,7 @@ namespace OpenWifi { | ||||
|         } | ||||
|  | ||||
|         if(GetBoolParameter("resetMFA")) { | ||||
|             if(Request->getContentLength()>0) { | ||||
|                 std::ignore = ParseStream(); | ||||
|             } | ||||
|             DrainBody(); | ||||
|             if( (UserInfo_.userinfo.userRole == SecurityObjects::ROOT) || | ||||
|                 (UserInfo_.userinfo.userRole == SecurityObjects::ADMIN && Existing.userRole!=SecurityObjects::ROOT) || | ||||
|                 (UserInfo_.userinfo.id == Id)) { | ||||
| @@ -184,9 +183,7 @@ namespace OpenWifi { | ||||
|         } | ||||
|  | ||||
|         if(GetBoolParameter("forgotPassword")) { | ||||
|             if(Request->getContentLength()>0) { | ||||
|                 std::ignore = ParseStream(); | ||||
|             } | ||||
|             DrainBody(); | ||||
|             Existing.changePassword = true; | ||||
|             Logger_.information(fmt::format("FORGOTTEN-PASSWORD({}): Request for {}", Request->clientAddress().toString(), Existing.email)); | ||||
|             SecurityObjects::ActionLink NewLink; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 stephb9959
					stephb9959