phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] api/auth class.auth_sql.php, 1.1.1.1.2.3, 1.1.1.1.2.4


From: Joseph Engo <address@hidden>
Subject: [Phpgroupware-cvs] api/auth class.auth_sql.php, 1.1.1.1.2.3, 1.1.1.1.2.4
Date: Mon, 10 Nov 2003 00:36:07 +0000

Update of /cvsroot/phpgroupware/api/auth
In directory subversions:/tmp/cvs-serv17516/api/auth

Modified Files:
      Tag: proposal-branch
        class.auth_sql.php 
Log Message:
- Created a *basic* user profile editor, mainly so it will be easier to create 
the contacts class around it
- Added basic parts to auth.change_passsword, it only works for current user 
and needs to ACL checking
- I added profile.xsl pending talking to Seek3r about combing about.xsl, 
home.xsl and profile.xsl into base.xsl
- Added api.statecache.cancel, which will put you into the previous op history 
item.
  I didn't use prevop becuase if you refresh that form, or submit it, it will 
throw things off


Index: class.auth_sql.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/auth/class.auth_sql.php,v
retrieving revision 1.1.1.1.2.3
retrieving revision 1.1.1.1.2.4
diff -C2 -d -r1.1.1.1.2.3 -r1.1.1.1.2.4
*** class.auth_sql.php  3 Nov 2003 17:31:22 -0000       1.1.1.1.2.3
--- class.auth_sql.php  10 Nov 2003 00:36:05 -0000      1.1.1.1.2.4
***************
*** 57,63 ****
                }
  
!               function change_password($current_passwd, $new_passwd, 
$username = '')
                {
  
                }
  
--- 57,73 ----
                }
  
!               // FIXME: This should check the current password before 
allowing a password change for current user
!               // Do an ACL check for changing other users
!               function change_password()
                {
+                       $args = new safe_args();
+                       $args->set('current_passwd', '##REQUIRED##', 'any');
+                       $args->set('new_passwd', '##REQUIRED##', 'string');
+                       $args->set('account_id', '##NOTSET##', 'string');
+                       $args = $args->get(func_get_args(),__LINE__,__FILE__);
  
+                       $this->db->query("update phpgw_accounts set 
account_pwd='" . md5($args['new_passwd']) . "' where account_id='"
+                               . $args['account_id'] . "'",__LINE__,__FILE__);
+                       return ($this->db->affected_rows() ? True : False);
                }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]