Browse Source
			
			
			reset verification state if max tries are reached
			
				Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
			
			
				pull/4695/head
			
			
		 
		
			
				
					
						
						Bjoern Schiessle
					
					9 years ago
					
				 
				
			 
		 
		
			
				
				  
				  No known key found for this signature in database
				  
				  	
						GPG Key ID: 2378A753E2BF04F6
				  	
				  
				
			
		
		
		
	
		
			
				 1 changed files with 
15 additions and 
0 deletions
			 
			
		 
		
			
				- 
					
					
					 
					settings/BackgroundJobs/VerifyUserData.php
				
 
			
		
		
			
				
					
					
						
							
								
									
										
											
	
		
			
				| 
					
					
						
							
						
					
					
				 | 
				@ -96,6 +96,8 @@ class VerifyUserData extends Job { | 
			
		
		
	
		
			
				 | 
				 | 
							$jobList->remove($this, $this->argument); | 
				 | 
				 | 
							$jobList->remove($this, $this->argument); | 
			
		
		
	
		
			
				 | 
				 | 
							if ($this->retainJob) { | 
				 | 
				 | 
							if ($this->retainJob) { | 
			
		
		
	
		
			
				 | 
				 | 
								$this->reAddJob($jobList, $this->argument); | 
				 | 
				 | 
								$this->reAddJob($jobList, $this->argument); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
							} else { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
								$this->resetVerificationState(); | 
			
		
		
	
		
			
				 | 
				 | 
							} | 
				 | 
				 | 
							} | 
			
		
		
	
		
			
				 | 
				 | 
						} | 
				 | 
				 | 
						} | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -270,4 +272,17 @@ class VerifyUserData extends Job { | 
			
		
		
	
		
			
				 | 
				 | 
						return ((time() - $lastRun) > $this->interval); | 
				 | 
				 | 
						return ((time() - $lastRun) > $this->interval); | 
			
		
		
	
		
			
				 | 
				 | 
					} | 
				 | 
				 | 
					} | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
					/** | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
					 * reset verification state after max tries are reached | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
					 */ | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
					protected function resetVerificationState() { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
						$user = $this->userManager->get($this->argument['uid']); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
						if ($user !== null) { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
							$accountData = $this->accountManager->getUser($user); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
							$accountData[$this->argument['type']]['verified'] = AccountManager::NOT_VERIFIED; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
							$this->accountManager->updateUser($user, $accountData); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
						} | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
					} | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				} | 
				 | 
				 | 
				} |