File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -838,6 +838,11 @@ if (!debugOnly) {
838838 }
839839 }
840840 break ;
841+ case 'p' : //profile a user
842+ console . putmsg ( green + high_intensity +
843+ "User to profile -> " ) ;
844+ userRecords . userDataUI . profileUser ( console . getstr ( ) ) ;
845+ break ;
841846 default :
842847 console . putmsg ( excuse ) ;
843848 break ;
Original file line number Diff line number Diff line change @@ -256,6 +256,33 @@ userRecords = {
256256 //terminology now)
257257
258258 // ----++++****====userDataUI methods====****++++----
259+ profileUser : function ( uname ) {
260+ var profileeSettings = { } ;
261+ var unum , uObj ;
262+
263+ if ( ( unum = system . matchuser ( uname ) ) == 0 ) {
264+ console . putmsg ( yellow + high_intensity + "User " + green +
265+ uname + " was not found!\n" ) ;
266+ throw new dDocException ( "profileUser() Exception" ,
267+ "Unable to locate " + uname , 1 ) ;
268+ }
269+
270+ profileeSettings = userRecords . userDataIO . loadSettings ( unum ) ;
271+ uObj = new User ( unum ) ;
272+
273+ console . putmsg ( cyan + high_intensity + uObj . alias + "\n" +
274+ yellow + high_intensity + uObj . address + "\n" +
275+ uObj . location + "\n" ) ;
276+
277+ if ( profileeSettings == null ) { //that is the error condition, no?
278+ console . putmsg ( yellow + high_intensity + "User has not set up" +
279+ " profile information yet\n\n" ) ;
280+ } else {
281+ console . putmsg ( high_intensity + green + "Doing: " + cyan +
282+ profileeSettings . doing + "\n\n" + green +
283+ profileeSettings . info + "\n\n" ) ;
284+ }
285+ } ,
259286 /*
260287 * summary:
261288 * obtains a new list of lines of text to utilize as the
You can’t perform that action at this time.
0 commit comments