phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] api/class.base.php, 1.1.1.1.2.33


From: nomail
Subject: [Phpgroupware-cvs] api/class.base.php, 1.1.1.1.2.33
Date: Mon, 28 Jun 2004 23:40:57 +0200

Update of /api
Modified Files:
        Branch: proposal-branch
          class.base.php

date: 2004/06/28 21:40:57;  author: jengo;  state: Exp;  lines: +9 -3

Log Message:
- Changed parameter order on auth->change_password()
- There is now a base class (api_auth_base) which api_auth_* extends off, 
_create_password() and _verify_password() were moved into it since they are 
shared.
- Presently, in order to change your password you need to have ACL rights to 
edit accounts.  This is only temp so it allows me to make some other fixes.  I 
also did this becuase normal users will have to enter there current password in 
order to change theres.  Which will also be required from all interfaces.
- New accounts call auth->create_password and use the system default now
=====================================================================
Index: api/class.base.php
diff -u api/class.base.php:1.1.1.1.2.32 api/class.base.php:1.1.1.1.2.33
--- api/class.base.php:1.1.1.1.2.32     Sun Jun 20 16:43:27 2004
+++ api/class.base.php  Mon Jun 28 21:40:57 2004
@@ -210,8 +210,14 @@
                                        
$GLOBALS['phpgw']->accounts->data['lastname']  = $args['profile_lastname'];
                                        
$GLOBALS['phpgw']->accounts->save_repository();
 
-                                       
execMethod('api.auth.change_password',array('current_passwd' => '', 
'new_passwd' => $args['profile_password'], 'account_id' => 
$GLOBALS['phpgw_data']['user']['id']));
-                                       $GLOBALS['msgbox']->add(lang('Profile 
has been updated successfully'), 'notice');
+                                       if (! 
execMethod('api.auth.change_password',$args['profile_password']))
+                                       {
+                                               trigger_error('There was a 
problem attempting to change your password',E_USER_WARNING);
+                                       }
+                                       else
+                                       {
+                                               
$GLOBALS['msgbox']->add(lang('Profile has been updated successfully'), 
'notice');
+                                       }
                                }
                        }
                        else




reply via email to

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