Records the verification time when a user verifies their email and updates it in the database. This method sets the timestamp when the user successfully verifies their email. # Errors when has DB query error
(mut self, db: &DatabaseConnection)
| 247 | /// |
| 248 | /// when has DB query error |
| 249 | pub async fn verified(mut self, db: &DatabaseConnection) -> ModelResult<Model> { |
| 250 | self.email_verified_at = ActiveValue::set(Some(Local::now().naive_local())); |
| 251 | Ok(self.update(db).await?) |
| 252 | } |
| 253 | |
| 254 | /// Resets the current user password with a new password and |
| 255 | /// updates it in the database. |