MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / set_email_verification_sent

Method set_email_verification_sent

examples/loco_starter/src/models/users.rs:209–216  ·  view source on GitHub ↗

Sets the email verification information for the user and updates it in the database. This method is used to record the timestamp when the email verification was sent and generate a unique verification token for the user. # Errors when has DB query error

(
        mut self,
        db: &DatabaseConnection,
    )

Source from the content-addressed store, hash-verified

207 ///
208 /// when has DB query error
209 pub async fn set_email_verification_sent(
210 mut self,
211 db: &DatabaseConnection,
212 ) -> ModelResult<Model> {
213 self.email_verification_sent_at = ActiveValue::set(Some(Local::now().naive_local()));
214 self.email_verification_token = ActiveValue::Set(Some(Uuid::new_v4().to_string()));
215 Ok(self.update(db).await?)
216 }
217
218 /// Sets the information for a reset password request,
219 /// generates a unique reset password token, and updates it in the

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected