daily pastebin goal
15%
SHARE
TWEET

cwmars.change_password

Dyrcona Jun 25th, 2018 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE OR REPLACE FUNCTION cwmars.change_passwd(userid INT, newpasswd TEXT, passwdtype TEXT DEFAULT 'main')
  2. RETURNS VOID AS $$
  3. DECLARE
  4.     newsalt TEXT;
  5. BEGIN
  6.     SELECT actor.create_salt(passwdtype) INTO newsalt;
  7.     PERFORM actor.set_passwd(userid, passwdtype, md5(newsalt || md5(newpasswd)), newsalt);
  8. END;
  9. $$ LANGUAGE 'plpgsql';
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top