|
|
@@ -197,4 +197,33 @@ class UsuarioController extends Controller {
|
|
|
}
|
|
|
} while ($continuar);
|
|
|
}
|
|
|
+
|
|
|
+ public function actionCambiarClave($uid, $clave) {
|
|
|
+ if(trim($uid) === "" || trim($clave) === "") {
|
|
|
+ return $this->stdout("Los parámetros uid y clave son obligatorios\n");
|
|
|
+ }
|
|
|
+
|
|
|
+ $firebase = new FirebaseHelper();
|
|
|
+ $auth = $firebase->authentication();
|
|
|
+
|
|
|
+ $res = $auth->changeUserPassword($uid, $clave);
|
|
|
+
|
|
|
+ $this->stdout("Proceso terminado \n");
|
|
|
+ }
|
|
|
+
|
|
|
+ public function actionCambiarTelefono($uid, $telefono) {
|
|
|
+ if(trim($uid) === "" || trim($telefono) === "") {
|
|
|
+ return $this->stdout("Los parámetros uid y telefono son obligatorios\n");
|
|
|
+ }
|
|
|
+
|
|
|
+ $firebase = new FirebaseHelper();
|
|
|
+ $auth = $firebase->authentication();
|
|
|
+
|
|
|
+ $telefono = trim($telefono);
|
|
|
+
|
|
|
+ $propiedades = ["phoneNumber" => "+52{$telefono}"];
|
|
|
+ $res = $auth->updateUser($uid, $propiedades);
|
|
|
+
|
|
|
+ $this->stdout("Proceso terminado \n");
|
|
|
+ }
|
|
|
}
|